import request from '@/utils/request'

// 获取所有员工
const getEmployeeListAPI = params => {
  return request({
    url: 'park/sys/user',
    params
  })
}

// 添加员工
const createEmployeeAPI = data => {
  return request({
    url: 'park/sys/user',
    method: 'post',
    data
  })
}

// 获取员工详
const getEmpDetail = id => {
  return request({
    url: `park/sys/user/${id}`
  })
}

// 编辑员工
const updateEmpAPI = data => {
  return request({
    url: 'park/sys/user',
    method: 'put',
    data
  })
}

// 删除员工
const delEmployeeAPI = id => {
  return request({
    url: `park/sys/user/${id}`,
    method: 'delete'
  })
}

export { getEmployeeListAPI, createEmployeeAPI, getEmpDetail, updateEmpAPI, delEmployeeAPI }
